import java.util.InputMismatchException;
import java.util.Scanner;

public class ComputePrice {
    public static void main(String[] args) {
        String menu = "北京烤鸭:189元 西芹炒肉:12.9元 酸菜鱼:69元 铁板牛柳:32元";
        Scanner scanner = new Scanner(menu);
        String regex = "[^0123456789.]+";
        scanner = scanner.useDelimiter(regex);
        double sum = 0;
        while(scanner.hasNext()){
            try{
                double price = scanner.nextDouble();
                sum += price;
                System.out.println(price);
            }
            catch(InputMismatchException exp){
                String tmp = scanner.next();
                System.out.println("123");
            }
        }
        System.out.println("菜单总价格："+sum+"元");
    }
}
